﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using SDM.ExamPlanner.BLL;
using SDM.ExamPlanner.BLL.Interfaces;
using SDM.ExamPlanner.DALC;
using SDM.ExamPlanner.DALC.Interfaces;
using SDM.ExamPlanner.DTO;
using sdm.exam.ui.ClassAdministration;
using sdm.exam.ui.ExamAdministration;
using sdm.exam.ui.LocationAdministration;

namespace sdm.exam.ui
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            Ninjector.Kernel.Bind<DataContext>().ToConstant(new DataContext());
            Ninjector.Kernel.Bind(typeof(IRepository<>)).To(typeof(DataRepository<>));
            Ninjector.Kernel.Bind(typeof(IManager<>)).To(typeof(Manager<>));
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            grid1.Children.Add(new MainControl());
        }

        private void btnExamManager_Click(object sender, RoutedEventArgs e)
        {
            grid1.Children.Clear();
            grid1.Children.Add(new MainExamAdminMenu());
        }

        private void button3_Click(object sender, RoutedEventArgs e)
        {
            grid1.Children.Clear();
            grid1.Children.Add(new TeamRegistration());
        }

        private void btnLocationManager_Click(object sender, RoutedEventArgs e)
        {
            grid1.Children.Clear();
            grid1.Children.Add(new AdministrateExamLocations());
        }

        private void btnTeacherManager_Click(object sender, RoutedEventArgs e)
        {
            grid1.Children.Clear();
            grid1.Children.Add(new TeacherForSubject());
        }
    }
}
